package org.yefei.homeworkday06;

import java.util.Scanner;

public class HomeWorkTwo {

	public static void main(String[] args) {
		// 2：将一个正整数分解质因数。例如：输入90,打印出90=2*3*3*5。
		Scanner sc = new Scanner(System.in);
		System.out.println("键入一个正整数：");
		int num = sc.nextInt();
		System.out.print(num + "=");
		for (int i = 2; i * i <= num;) {
			if (num == i) {
				System.out.print(num);
				break;
			} else if (num % i == 0) {
				System.out.print(i + "*");
				num /= i;
			} else {
				i++;
			}
		}
	}
}